import request from '@/utils/request'

export function getResourcesList(listQuery) {
  return request.get('/resource/queryResources', { params: listQuery })
}

export function getResDetailUsageList(listQuery,resources_id) {
  return request.get('/resource/queryResDetailUsage',
  {
    params: {
      'page': listQuery,
      'resources_id': resources_id
    }
  })
}

export function addResources(resources) {
  return request.post('/resource/addResources', resources)
}

export function updateResources(resources) {
  return request.put('/resource/updateResources', resources)
}

export function adjustTotalAmount(resources_id,addAmount) {
  var temp = {
    'resources_id': resources_id,
    'addAmount': Number(addAmount)
  }
  return request.put('/resource/adjustTotalAmount', temp)
}

